package com.example.controller;

import com.example.common.Result;
import com.example.entity.Inventory;
import com.example.service.InventoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 库存(Inventory)表控制层
 *
 */
@RestController
public class InventoryController {
    @Resource
    private InventoryService inventoryService;

    //添加库存信息
    @ResponseBody
    @RequestMapping("inventoryAdd")
    public Result goodsKcAdd(Inventory inventory, HttpServletRequest request) {
        inventoryService.addInventory(inventory);
        return Result.success();
    }
}

